What is the main difference between shallow cloning and deep cloning of objects in java? Sumit Kesarwani234210-Apr-2014javajava Updated on 15-Sep-2020
Sumit Kesarwani
10-Apr-2014Java supports shallow cloning of objects by default when a class implements the java.lang.Cloneable interface.
Deep cloning through serialization is faster to develop and easier to maintain but carries a performance overhead.